<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="renderer" content="webkit" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<meta name="App-Config" content="fullscreen=yes,useHistoryState=yes,transition=yes" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="yes" name="apple-touch-fullscreen" />
		<meta content="telephone=no,email=no" name=format-detection />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<meta name="renderer" content="webkit" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<meta name="App-Config" content="fullscreen=yes,useHistoryState=yes,transition=yes" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="yes" name="apple-touch-fullscreen" />
		<meta content="telephone=no,email=no" name=format-detection />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<link href="../c/detailed.css" rel="stylesheet" />
	</head>
	<body>
		<div class="nav">
			<p name="a"><span>增加记录</span><small class="bgred" style="height: 0.125rem;"></small></p>
			<p name="a"><span>减少记录</span><small class="bgred"></small></p>
		</div>
		<div class="detailed_list">
			<!-- <div class="detailed_div">
				<p>任务奖励</p>
				<p><span>奖励日期: 2020-11-22 12:00:00</span><span>+150</span></p>
			</div> -->
			<!--<div class="detailed_div">
				<p>任务奖励</p>
				<p><span>提现数量: 1150</span></p>
				<p><span>手续费: 800</span></p>
				<p><span>任务日期: 2020-11-20 20:45:35</span><span>愉币</span></p>
				<p><span>奖励日期: 2020-11-22 12:00:00</span><span>+150</span></p>
			</div> -->
		</div>
	</body>
</html>
<script src="../j/api.js"></script>
<script src="../j/jquery-3.3.1.min.js"></script>
<script>
	apiready = function() {
		// urls();
		_msg("加载中!请等待");
		_ajax("member/mwl", function(ret, err) {
			if (ret) {
				
				if (ret.data) {
					var tpl = '';
					for (var i = 0; i < ret.data.length; i++) {
						if (ret.data[i].type == 1) {
							tpl += '<div class="detailed_div">';
							tpl += '<p>' + ret.data[i].describess + '</p>';
							tpl += '<p><span>提现数量: ' + ret.data[i].money + '</span></p>';
							tpl += '<p><span>手续费: ' + ret.data[i].charge + '</span></p>';
							tpl += '<p><span>任务日期:';
							var date = new Date(Number(ret.data[i].create_at + "000")); //将接收到的的String类型的时间转为数字类型
							var y = date.getFullYear();
							var m = date.getMonth() + 1;
							var d = date.getDate();
							var hour = date.getHours().toString();
							var minutes = date.getMinutes().toString();
							var seconds = date.getSeconds().toString();
							var time = y + "-" + m + "-" + d + "&nbsp;&nbsp" + hour + ":" + minutes + ":" + seconds;
							tpl += '' + time + '</span><span>愉币</span></p>';
							tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money + '</span></p>';
							tpl += '</div>';
						} else {
							tpl += '<div class="detailed_div">';
							tpl += '<p>' + ret.data[i].describess + '</p>';
							tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money + '</span></p>';
							tpl += '</div>';
						}

					}
					if (tpl == '') {
						$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
					} else {
						$(".detailed_list").html(tpl);
					}

				} else {
					$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
				}
			} else {
				$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
			}
		}, {
			status: 0
		})
		api.addEventListener({
			name: 'scrolltobottom',
			extra: {
				threshold: 150 //设置距离底部多少距离时触发，默认值为0，数字类型
			}
		}, function(ret, err) {
			var ind = $(".nav p[name=a]").index();
			if (ind == 1) {
				var ml = "member/mwl";
				_ajax(ml, function(ret, err) {
					if (ret) {
						if (ret.data) {
							var tpl = '';
							for (var i = 0; i < ret.data.length; i++) {
								if (ret.data[i].type == 1) {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									tpl += '<p><span>提现数量: ' + ret.data[i].money + '</span></p>';
									tpl += '<p><span>手续费: ' + ret.data[i].charge + '</span></p>';
									tpl += '<p><span>任务日期:';
									var date = new Date(Number(ret.data[i].create_at + "000")); //将接收到的的String类型的时间转为数字类型
									var y = date.getFullYear();
									var m = date.getMonth() + 1;
									var d = date.getDate();
									var hour = date.getHours().toString();
									var minutes = date.getMinutes().toString();
									var seconds = date.getSeconds().toString();
									var time = y + "-" + m + "-" + d + "&nbsp;&nbsp" + hour + ":" + minutes + ":" + seconds;
									// '+ret.data[i].create_at_txt+'
									tpl += '' + time + '</span><span>愉币</span></p>';
									if (ind == 1) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								} else {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									if (ind == 1) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>提现日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								}
							}

							if (tpl == '') {
								$(this).attr("name", "a");
								$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
							} else {
								$(this).attr("name", "a");
								var mls=$(".detailed_list").html();
								     tpl=mls+tpl;
								$(".detailed_list").html(tpl);
							}

						} else {
							$(this).attr("name", "a");
							$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
						}
					} else {
						$(this).attr("name", "a");
						$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
					}

				}, {
					status: 0
				})

			} else {
				var ml = "member/mwl";
				_ajax(ml, function(ret, err) {
					if (ret) {
						if (ret.data) {
							var tpl = '';
							for (var i = 0; i < ret.data.length; i++) {
								if (ret.data[i].type == 1) {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									tpl += '<p><span>提现数量: ' + ret.data[i].money + '</span></p>';
									tpl += '<p><span>手续费: ' + ret.data[i].charge + '</span></p>';
									tpl += '<p><span>任务日期:';
									var date = new Date(Number(ret.data[i].create_at + "000")); //将接收到的的String类型的时间转为数字类型
									var y = date.getFullYear();
									var m = date.getMonth() + 1;
									var d = date.getDate();
									var hour = date.getHours().toString();
									var minutes = date.getMinutes().toString();
									var seconds = date.getSeconds().toString();
									var time = y + "-" + m + "-" + d + "&nbsp;&nbsp" + hour + ":" + minutes + ":" + seconds;
									// '+ret.data[i].create_at_txt+'
									tpl += '' + time + '</span><span>愉币</span></p>';
									if (ind == 1) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								} else {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									if (ind == 1) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>提现日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								}
							}

							if (tpl == '') {
								$(this).attr("name", "a");
								$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
							} else {
								$(this).attr("name", "a");
								var mls=$(".detailed_list").html();
								     tpl=mls+tpl;
								$(".detailed_list").html(tpl);
							}

						} else {
							$(this).attr("name", "a");
							$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
						}
					} else {
						$(this).attr("name", "a");
						$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
					}

				}, {
					status: 1
				})
			}

		})
		$(".nav").on("click", "p", function() {
			$(".nav p small").css("height", "0px");
			$(this).children("small").css("height", "0.125rem");
			var nm = $(this).attr("name");
			$(this).siblings().attr("name", "a");
			_msg("数据获取中!请等待");
			if (nm == "a") {
				var ind = $(this).index();
				$(this).attr("name", "b");
				var ml = "member/mwl";
				_ajax(ml, function(ret, err) {
					// console.log(JSON.stringify(ret));
					if (ret) {
						if (ret.data) {
							var tpl = '';
							for (var i = 0; i < ret.data.length; i++) {
								if (ret.data[i].type == 1) {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									tpl += '<p><span>提现数量: ' + ret.data[i].money + '</span></p>';
									tpl += '<p><span>手续费: ' + ret.data[i].charge + '</span></p>';
									tpl += '<p><span>任务日期:';
									var date = new Date(Number(ret.data[i].create_at + "000")); //将接收到的的String类型的时间转为数字类型
									var y = date.getFullYear();
									var m = date.getMonth() + 1;
									var d = date.getDate();
									var hour = date.getHours().toString();
									var minutes = date.getMinutes().toString();
									var seconds = date.getSeconds().toString();
									var time = y + "-" + m + "-" + d + "&nbsp;&nbsp" + hour + ":" + minutes + ":" + seconds;
									// '+ret.data[i].create_at_txt+'
									tpl += '' + time + '</span><span>愉币</span></p>';
									if (ind == 0) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								} else {
									tpl += '<div class="detailed_div">';
									tpl += '<p>' + ret.data[i].describess + '</p>';
									if (ind == 0) {
										tpl += '<p><span>奖励日期:' + ret.data[i].create_at_txt + '</span><span>+' + ret.data[i].money +
											'</span></p>';
									} else {
										tpl += '<p><span>提现日期:' + ret.data[i].create_at_txt + '</span><span>-' + ret.data[i].money +
											'</span></p>';
									}
									tpl += '</div>';
								}
							}
							if (tpl == '') {
								$(this).attr("name", "a");
								$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
							} else {
								$(this).attr("name", "a");
								$(".detailed_list").html(tpl);
							}
						} else {
							$(this).attr("name", "a");
							$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
						}
					} else {
						$(this).attr("name", "a");
						$(".detailed_list").html("<p style='color:#fff;text-align: center;margin-top:1rem;'>暂无数据！</p>")
					}
				}, {
					status: ind
				})
			} else {
			}
		})

	}
</script>
